﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Snooze.Model
{
    using Castle.ActiveRecord;

    [ActiveRecord]
    public class Snooze : Persistent
    {
        #region members
        private int repeat = -1; // negative numbers means infinity
        private TimeSpan interval = new TimeSpan(0, 7, 0);
        private IList<Alarm> alarms = new List<Alarm>();
         
        // TODO: incremented volume steps etc..
        #endregion

        #region public persistent properties
        [Property]
        public int Repeat
        {
            get { return repeat; }
            set { repeat = value; }
        }
        [Property]
        public TimeSpan Interval
        {
            get { return interval; }
            set { interval = value; }
        }
        [HasMany]
        public IList<Alarm> Alarms
        {
            get { return alarms; }
            set { alarms = value; }
        }
        #endregion
    }
}
